import { getDB } from "../utils/db/mysql";

export default defineEventHandler(async () => {
  let con = getDB();
  let sql = "SELECT * FROM `article-right`";

  let resut = await con.execute(sql);
  //释放连接
  await con.end();
  // console.log("resut", resut[0]);

  return {
    code: 2000,
    message: resut[0],
  };
});
